package splitting;

import static org.junit.Assert.*;

import java.io.File;
import java.util.List;

import org.junit.Test;

public class SegmentBuilderTest {

    @Test
    public void testBuild() {
//        File indexFile = new File("C:/test/av.index");
//        
//        SegmentBuilder builder = new ReadLineSegmentBuilder(indexFile);
//        
//        builder.build();
//        
//        List<Segment> builtSegments = builder.builtSegments();
//        assertFalse(builtSegments.isEmpty());
//        
//        String testWord = "anglicization";
//        File segmentFile = null;
//        
//        for (Segment segment : builtSegments) {
//            if (segment.contains(testWord)) {
//                segmentFile = segment.file();
//            }
//        }
//        
//        assertNotNull(segmentFile);
//        System.out.println(segmentFile);
        Segment segment = new Segment("Wage theory", "wardrobe dealer");
        
        assertTrue(segment.contains("anglicization"));
    }

}
